﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace projet_autoecole
{
    /// <summary>
    /// Logique d'interaction pour PrincipaleWindow.xaml
    /// </summary>
    public partial class PrincipaleWindow : Window
    {
        public PrincipaleWindow()
        {
            InitializeComponent();
        }

        //Lancer la fenetre de login avant d'afficher la fenetre principale
        private void Window_Initialized(object sender, EventArgs e)
        {
            LoginWindow frm = new LoginWindow();

            frm.ShowDialog();
            if (!frm.DialogResult.HasValue || !frm.DialogResult.Value)
            {
                Environment.Exit(0);
            }
        }

    }
}
